feat: add comply54 → TRACE v0.1 integration (Level 0, African regulatory compliance)#11
Conversation
Adds a comply54 integration that converts a ComplianceResult from the comply54 African regulatory compliance library into a signed TRACE v0.1 JWT (Ed25519, Level 0 software-only conformance). What's included: - integration.yaml — schema-validated manifest - src/comply54_to_trace.py — adapter: ComplianceResult JSON → TRACE JWT - tests/test_comply54_to_trace.py — 20 passing tests covering appraisal mapping, envelope fields, comply54 extension claims, and JWT signing - requirements.txt — PyJWT + cryptography - README.md — usage, conformance table, limitations Decision mapping: allow → affirming | audit → advisory | escalate → warning | deny → contraindicated Policy bundle hash: SHA-256 of sorted comply54 pack IDs (reproducible). Conforms to TRACE v0.1 at Level 0. Hardware fields are placeholders. Signed-off-by: oluwajuwon omotayo <oluwajuwon.omotayo@ginuxai.com> Signed-off-by: oluwajuwon omotayo <ginuxtechacademy@gmail.com>
Signed-off-by: oluwajuwon omotayo <oluwajuwon.omotayo@ginuxai.com> Signed-off-by: oluwajuwon omotayo <ginuxtechacademy@gmail.com>
|
🟡 Contributor Check: MEDIUM
Automated check by AGT Contributor Check. |
3dde037 to
64841cb
Compare
carloshvp
left a comment
There was a problem hiding this comment.
Review pass on current head (64841cb). This looks much cleaner structurally than the earlier Sentinel PRs.
Checked locally:
- Manifest validates against
schema/integration.schema.json;comply54is picked up fromintegrations/comply54/integration.yaml. - Tests pass with the integration requirements installed:
uv run --with-requirements integrations/comply54/requirements.txt --with pytest --env-file /dev/null python -m pytest integrations/comply54/tests -q->20 passed
- CLI smoke succeeds and writes a compact signed JWT:
uv run --with-requirements integrations/comply54/requirements.txt python integrations/comply54/src/comply54_to_trace.py <result.json> --agent-id payments-agent --model openai/gpt-4o --out <claim.jwt>- output file exists and has 3 JWT parts.
- File layout is under
integrations/comply54/, and I do not see generated__pycache__files in the PR.
No blocker from my pass. One small docs tweak worth considering: the README test step says pip install pytest, but a clean environment also needs the adapter requirements (PyJWT, cryptography). I’d suggest making that command explicit, for example pip install -r integrations/comply54/requirements.txt pytest from the repo root, or the equivalent from inside integrations/comply54/.
The remaining failing check appears to be the maintainer-approval gate, not a validation/test failure.
Per carloshvp review: `pip install pytest` alone misses PyJWT and cryptography. Now uses `pip install -r requirements.txt pytest` so a clean environment has all dependencies before running the 20 tests.
|
Thanks for the thorough pass, @carloshvp — really appreciate you checking the manifest, running the tests locally, and verifying the CLI output end-to-end. The docs fix is in: pushed ```bash That now covers And agreed on the failing check — I can see it's the maintainer gate rather than a test or validation failure. Happy to address anything else if it comes up during the final review. |
What this does
This integration is built on top of
agt-policies-nigeria— the policy pack repo cited in Microsoft AGT. comply54 is the Python/TypeScript enforcement layer built on top of those same Rego policies, packaged as an importable library (pip install comply54). This adapter bridges comply54'sComplianceResultinto a signed TRACE v0.1 JWT (Ed25519, Level 0 software-only).comply54 evaluates AI agent actions against 13 African data protection and financial regulations: NDPA 2023 (Nigeria), CBN Transaction Controls, NFIU AML/MLPPA 2022, KDPA 2019 (Kenya), POPIA (South Africa), Ghana DPA, Rwanda DPA 2021, Egypt PDPL 2020, Ethiopia PDP 2024, Mauritius DPA 2017, Tanzania PDPA 2022, Uganda DPPA 2019, and 5 OWASP Agentic AI universal controls.
The adapter maps the compliance decision into a verifiable TRACE claim so the policy outcome becomes a cryptographic receipt — auditable evidence that the African regulatory policy ran and what it decided.
Files
Decision → Appraisal mapping
overallappraisal.statusallowaffirmingauditadvisoryescalatewarningdenycontraindicatedReproduce in 2 minutes
Verified output (4 scenarios, tested against comply54==0.1.0 from PyPI)
get_balanceallowaffirmingdenycontraindicatedescalatewarningdenycontraindicatedConformance level
Level 0 (software-only). Hardware TEE fields (
runtime.measurement,model.weights_digest,build_provenance.digest) are explicitly markednot-attestedor software-simulated. No claims are made beyond Level 0.Limitations (stated explicitly)
transparencyis empty — no SCITT log anchor at Level 0.model.*fields reflect what the caller passes via--model. comply54 evaluates policy against the agent's action; it does not independently verify which model ran.cc @imran-siddique — you know the underlying policy work from my AGT Nigeria contribution. comply54 is the enforcement library built on top of those same packs — this adapter makes the compliance decisions TRACE-verifiable. Happy to address any feedback before merge.